#version 330 core

in vec2 texCoords;

uniform vec3 color;
uniform sampler2D texture;

void main()
{
	vec3 texture_color = texture2D(texture, texCoords).rgb;
	float k = texture_color.r * 0.3 + texture_color.g * 0.3 + texture_color.b * 0.3 + 0.6;
	gl_FragColor = vec4(color, 1.0f) * k;
}